<?php
/*
 * @Author: stark
 * @Date: 2022-06-20 11:39:47
 */

include_once "common_car.php";
$data=json_decode(file_get_contents('php://input'),true);

if (!$data) {
    die(json_encode(['code'=>1,'msg'=>'id参数错误','data'=>[]]));
}

$sql="SELECT * FROM cart WHERE user_id={$data["userId"]} and goods_id={$data["goodsId"]} and goods_count={$data["goodsCount"]}";

$result=mysqli_fetch_assoc(mysqli_query($link,$sql));

if($result){
    echo success($result);
 }else{
    die(error("参数错误"));
} 


?>